#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QMouseEvent>
#include"shopinf.h"
#include"public.h"
#include"getinftonet.h"
#include<QVBoxLayout>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();


private:
    void init();

    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

signals:
    void getshopinfo(structshopinf*);

private slots:
    void on_min_btn_2_clicked();
    void on_max_btn_2_clicked();
    void on_close_btn_clicked();

    void showshopinf(structshopinf*); //main信号传递刷新店铺信息

    void on_comboBox_2_currentIndexChanged(const QString &arg1);

    void on_comboBox_currentIndexChanged(const QString &arg1);

    void slotchangeislog(QString &islog);  //改变在线状态

    void slotaddmenu(QVector<mymenu> &menulist); //菜单页面


    void slotmenulist(clihnum & clih); //订单
    void slotmenulistok(clihnum & clih); //完成的订单

    void on_tabWidget_tabBarClicked(int index);

private:
    Ui::Widget *ui;

    bool bPressFlag;//窗体拖动
    QPoint beginDrag;//窗体拖动

    shopinf *shopinfo;//信息窗口
    Getinftonet * gettonet; //网络数据接口

    QString Islog;  //店铺是否在线

    QMap<QString,clihnum> mlist;  //所有订单

    QVBoxLayout *layoutd = new QVBoxLayout;
    QWidget *widgd = new QWidget;
    QWidget *widgd3 = new QWidget;
    QVBoxLayout *layoutd3 = new QVBoxLayout;
    int nsize;
    int nsizeok;

};
#endif // WIDGET_H
